﻿using Autofac;
using Library.Core.Infrastructure;

namespace Synthesize.Infrastructure.Modules
{
    /// <summary>
    /// 基础类模块
    /// </summary>
    public class InfrastructureModule : Module
    {
        /// <summary>
        /// 加载
        /// </summary>
        /// <param name="builder"></param>
        protected override void Load(ContainerBuilder builder)
        {
            builder.RegisterAssemblyTypes(typeof(InfrastructureIocModel).Assembly)
                                .AsImplementedInterfaces()
                                .InstancePerLifetimeScope();

            builder.RegisterAssemblyTypes(typeof(InfrastructureException).Assembly)
                                .AsImplementedInterfaces()
                                .InstancePerLifetimeScope();
        }
    }
}
